<template>
  <div class="com">
    <div class="comlbt">
      <van-swipe
        class="my-swipe"
        :autoplay="3000"
        indicator-color="white"
        
      >
        <van-swipe-item v-for="item in comlbt"
        :key="item.id">
          <img :src="item" alt="" class="lbtimg">
        </van-swipe-item>
        
      </van-swipe>
    </div>
    <comslist :list="list"></comslist>
  </div>
</template>
<script>
import comslist from '../../components/pingtuan/pt.vue'
export default {
  data() {
    return {
      comlbt:[],
      list:[]
      
    };
  },
  methods:{
    // 拼团活动轮播图
   async getcomlbt(){
     const res=await this.$http.getmiaoshalbt()
     console.log(res);
     this.comlbt=res.data.data
   },
    //  拼团活动内容数据
    async getcomlist() {
      const res = await this.$http.comlist();
      console.log(res.data.data.list);
      this.list = res.data.data.list;
      console.log(this.list);
    },
  },
  created(){
    this.getcomlbt();
    this.getcomlist()
  },
  components:{
    comslist
  }
};
</script>
<style lang="scss">
.com {
  .comlbt {
    width: 90%;
    margin: 5% auto;
    .my-swipe .van-swipe-item {
      text-align: center;
      color: #fff;
      font-size: 20px;
      line-height: 150px;
      text-align: center;
      // background-color: #39a9ed;
      width: 90%;
    }
  }
  .my-swipe .van-swipe-item {
      height: 160px;
      text-align: center;
      color: #fff;
      font-size: 20px;
      line-height: 150px;
      text-align: center;
      // background-color: #39a9ed;
      width: 90%;
    }
    .lbtimg {
    width: 373px;
    height: 158px;
  }
}
</style>